#ifndef LOADINGINFO_H
#define LOADINGINFO_H

#ifdef FREEGLUT_IS_PRESENT
#  include <GL/freeglut.h>
#else
#  ifdef __APPLE__
#    include <GLUT/glut.h>
#  else
#    include <GL/glut.h>
#  endif
#endif

#define NUM_TEXTURES 256 //19

#define GRASS0_TEXTURE			  0
#define STONES0_TEXTURE			  1
#define MAP1_TEXTURE			  2
#define MAP2_TEXTURE			  3
#define MAP3_TEXTURE			  4
#define ICON_BUTTON_BUILDINGS_N   5
#define ICON_BUTTON_BUILDINGS_F   6
#define ICON_BUTTON_BUILDINGS_C   7
#define ICON_BUTTON_TREES_N		  8
#define ICON_BUTTON_TREES_F		  9
#define ICON_BUTTON_TREES_C		  10
#define ICON_BUTTON_TEXTURES_N	  11
#define ICON_BUTTON_TEXTURES_F    12
#define ICON_BUTTON_TEXTURES_C    13
#define ICON_BUTTON_MOVE_N		  14
#define ICON_BUTTON_MOVE_F		  15
#define ICON_BUTTON_MOVE_C		  16
#define ICON_BUTTON_ZOOMIN_N	  17
#define ICON_BUTTON_ZOOMIN_F	  18
#define ICON_BUTTON_ZOOMIN_C	  19
#define ICON_BUTTON_ZOOMOUT_N	  20
#define ICON_BUTTON_ZOOMOUT_F	  21
#define ICON_BUTTON_ZOOMOUT_C	  22
#define ICON_BUTTON_SAVE_N		  23
#define ICON_BUTTON_SAVE_F	      24
#define ICON_BUTTON_SAVE_C	      25
#define ICON_BUTTON_ROTATECW_N	  26
#define ICON_BUTTON_ROTATECW_F	  27
#define ICON_BUTTON_ROTATECW_C	  28
#define ICON_BUTTON_ROTATECCW_N	  29
#define ICON_BUTTON_ROTATECCW_F	  30
#define ICON_BUTTON_ROTATECCW_C	  31
#define ICON_BUTTON_UNDO_N		  32
#define ICON_BUTTON_UNDO_F		  33
#define ICON_BUTTON_UNDO_C		  34
#define ICON_BUTTON_REDO_N	   	  35
#define ICON_BUTTON_REDO_F	 	  36
#define ICON_BUTTON_REDO_C		  37
#define ICON_BUTTON_EXIT_N	   	  38
#define ICON_BUTTON_EXIT_F	 	  39
#define ICON_BUTTON_EXIT_C		  40
#define ICON_BUTTON_FACILITIES_N  41
#define ICON_BUTTON_FACILITIES_F  42
#define ICON_BUTTON_FACILITIES_C  43
#define ICON_BUTTON_WAYPOINTS_N	  44
#define ICON_BUTTON_WAYPOINTS_F	  45
#define ICON_BUTTON_WAYPOINTS_C	  46
#define ICON_BUTTON_BULLDOZER_N	  47
#define ICON_BUTTON_BULLDOZER_F	  48
#define ICON_BUTTON_BULLDOZER_C	  49
#define ICON_BUTTON_MOVIE_N		  50	
#define ICON_BUTTON_MOVIE_F       51
#define ICON_BUTTON_MOVIE_C       52

#define COUNTRYSIDE_TEXTURES      53	

#define CREATE 0
#define LOAD   1
#define BRIEF  2

class State;
class ssgContext;

// struct used for threaded class constructors
struct LoadingInfo
{
State* s;                   // new state created in the thread
State* old_s;               // state from which I arrived
ssgContext* cnt;
bool completed;
bool canceled;
bool doneCanceling;
float scenarioProgress;
float texturesProgress;
float mapProgress;
float objectsProgress;
char snr_filename[1024];
char brf_filename[1024];
char dem_filename[1024];             // file name, if any...
char obj_filename[1024];				 // .bmp name
char tex_filename[1024];				 // .bmp name
char map_filename[1024];				 // .bmp name
char wpn_filename[1024];
char cmv_filename[1024];		// movie file name
char wrd_filename[1024];    // world file name
char wrdmap_filename[1024];
GLint textures[NUM_TEXTURES] ;
int landTextures;
int buildingButtonsTextures;
int treeTextures;
int roadTextures;
int waypointTextures;
int movieTextures;
int facilityTextures;
int loadingType;						// load new scenario o create new scenario???
int w;			// main window width
int h;			// main window heigth
};

#endif //LOADINGINFO_H
